﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="spring" uri="/WEB-INF/lib/spring.tld"%>
<%String title="查看${table.TableMemo}";%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title><%=title%></title>
    <%@include file="../../include/jsAndCss.jsp" %>
    <script type="text/javascript">
	 /*数据详细*/
var ActionUrl=adminUrl+"${table.TableNameAlias}/";
 jQuery(function()
 {
      jQuery("#btnBack").click(function(){backToList();});//返回列表
	 init();
 });
#foreach($c in $ColumnList)
	#if($c.IsPrimary)
	#set ($primaryKey=$c.ColumnNameAlias)
	#end
#end
function init()
 {
 var id=GetRequest()["id"];
 var param={"${primaryKey}":id};
jQuery.ajax({
	url: ActionUrl+"View"+admExtension,
	data: param,
	type:"post",
	dataType: "json",
        success: function (result) {
            if (result.status == "SUCCESS") {
#foreach($c in $ColumnList)
	#if(${Utils.ToTitleLower($c.ColumnNameAlias)}=="status")
		jQuery("#lbl${c.ColumnNameAlias}").html(GetEnumText(Enum.SwitchStatus, result.data.${Utils.ToTitleLower($c.ColumnNameAlias)},1));
	#else
      jQuery("#lbl${c.ColumnNameAlias}").html(result.data.${Utils.ToTitleLower($c.ColumnNameAlias)});
    #end 
#end
	}
	else
	{
 commonBO.alertError(result);
	}
   },
    error: function () {
    jQuery.messager.alert('操作提醒', "操作失败，请查看错误日志或联系管理员！", 'error');
    }
	});
 }
 /*返回列表页*/
 function  backToList()
 {
     location.href="list"+admExtension;
 }
	
	</script>
</head>
<body>
<!--修改窗口-->
<div id="Win" class="easyui-window" title="<%=title%>" data-options="closed: false,closable:false,modal: true,resizable: true,minimizable: false,
        maximizable: true,maximized:false,collapsible: false" style="width: 550px; height: 400px; padding: 10px;">
    <div class="easyui-layout" data-options="fit:true">
        <form id="form1">
            <div data-options="region:'center'" style="padding: 10px;">
                <table align="center" class="view"  cellpadding="1" cellspacing="1" border="0" width="100%">
				#foreach($c in $ColumnList)
				  <tr><td class="tdleft">
                        <spring:message code="${c.ColumnNameAlias}"/>
                        ：</td>
                        <td class="tdright">
                            <label  id="lbl${c.ColumnNameAlias}"></label>
                        </td></tr>
				#end
                </table>
            </div>
            <div data-options="region:'south',border:false" style="text-align: right; padding: 5px 0 0;">
             <a class="easyui-linkbutton" data-options="iconCls:'icon-undo'"
                                   href="javascript:void(0)" id="btnBack">返回</a>
            </div>
        </form>
    </div>
</div>
</body>
</html>